#ifndef CONFIG_H
#define CONFIG_H
#include <QtMqtt/QtMqtt>
#include <QtMqtt/QMqttClient>

extern QMqttClient *client;

#define SOCKET_SERVER_ADDRESS "192.168.7.244"   //登陆服务器ip
#define SOCKET_SERVER_PORT 7777                 //登录服务器端口

#define MQTT_HOSTNAME "mqtt.yyzlab.com.cn"      //MQTT域名
#define MQTT_PORT 1883                          //MQTT端口
#define MQTT_DEVICE_SIM "group4/163310/DEVICE/SIM"  //硬件订阅topic
#define MQTT_DEVICE_APP "group4/163310/DEVICE/APP"  //硬件发布topic
#define MQTT_HOSTNAME "mqtt.yyzlab.com.cn"
#define MQTT_PORT 1883

//光照传感器信息
#define LIGHT "{\"light\":%lf,\"id\":%d}"
//温度、湿度传感器信息
#define TEM_HUM " {\"tem\":%lf,\"hum\":%lf,\"id\":%d}"
//蜂鸣器传感器信息
#define ALARM "{\"alarm\":%s,\"id\":%d}"
//风扇
#define FAN "{\"fan\":%s,\"id\":%d}"
//灯
#define LAMP "{\"lamp\":%s,\"id\":%d}"
//红外传感器信息
#define INFRARED "{\"infrared\":%s,\"id\":%d}"

#endif // CONFIG_H
